﻿@using ECGadmin.Common
@model SubCategoryTemplateDto

<div class="Info-header">
    <span>Template con</span>
</div>
<div class="Info-body sub-cate-temlate-list">
    <table class="table-odd table-plist table-sub-cate-template">
        <colgroup>
            <col style="width: 30px" />
            <col />
            <col />
            <col style="width: 150px" />
            <col style="width: 60px" />
        </colgroup>
        <tr class="tsc-template">
            <th scope="col">Mã</th>
            <th scope="col">Mô tả template danh mục</th>
            <th scope="col">Mô tả</th>
            <th scope="col">Thứ tự</th>
            <th scope="col"></th>
        </tr>
    </table>

    <div class="banner-wrapper m-t-20">
        @using (Ajax.BeginForm("SubTemplateCate", new AjaxOptions
                                                                {
                                                                    OnBegin = "ShowLoading",
                                                                    OnComplete = "HideLoading",
                                                                    OnSuccess = "AjaxResultDataAddSubCateTemplate"
                                                                }))
        {
            <table class="table-info create-banner-image">
                <tr>
                    <td class="tInfoLeft">
                        Template danh mục
                    </td>
                    <td class="tInfoRight">
                        @Html.DropDownListFor(m => m.ProductCateTempMappingId, new SelectList((List<ProductCateTempMappingDto>)ViewBag.CateTemplateList, "Id", "Description"))
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Mô tả
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.Description)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Nội dung template
                    </td>
                    <td class="tInfoRight">
                        @Html.TextAreaFor(m => m.TempContent, new { rows = "20", @class = "w-90-percent" })
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft">
                        Thứ tự
                    </td>
                    <td class="tInfoRight">
                        @Html.TextBoxFor(m => m.DisplayOrder)
                    </td>
                </tr>
                <tr>
                    <td class="tInfoLeft"></td>
                    <td class="tInfoRight">
                        <input type="submit" value="Tạo template con" class="m-t-b-10" />
                    </td>
                </tr>
            </table>
        }
    </div>
    <script src="~/Scripts/jquery.validate.min.js"></script>
    <script src="~/Scripts/jquery.validate.unobtrusive.min.js"></script>
</div>
